PlcScanWriteBlock

 

Write block (array) to plc_scan program.

 

void @PlcScanWriteBlock(int port, int station, int address, string extra1, int extra2, object value, int array_size);

 

Parameters

int port : Number of port to write

int station : Station number to write

int address : Address to write

string extra1 : extra1 to write

int extra2 : extra2 to write

object value : value (can be used among byte[], ushort[], uint[], ulong[], float[], double[] and string)

int array_size : Number of value

 

Return Value

None

 

Example 1

Val[0] = 1.5;

Val[1] = 2.3;

Val[2] = 3.4;

@PlcScanWriteBlock(0, 1, 5, "M", 0, Val, 3);

 

Description : Write the value of "Val" of float array to memory that can be found in port: 0, station: 1, address: 5, extra1: "M" and extra2: 0

 

Example2

@strcpy(buf, "Test Value");

size = @strlen(buf);
@PlcScanWriteBlock(0, 0, 0, "#MEM#", 3, buf, size);

 

Description : Write virtually the string to memory that can be found in port: 0, station: 0, address: 0 and extra2: 3 (string buffer)   Virtual writing string is supported from 10.2.5

 

Version Information

Supported Version: 10.2.0

 

Related Helps

@PlcScanSetPortActive()

@PlcScanSetReadDelay()

@PlcScanWriteBit()

@PlcScanWriteBlock()

@PlcScanWriteWord()